<?php

namespace app\admin\validate\coupon;

use think\Validate;

class CouponValidate extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "title"=>"require",
        "sort"=>"require",
        "status"=>"require",
        "num"=>"require",
        "enough_price"=>"require",
        "price"=>"require",
        "expire_days"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "title|require"=>"标题不能为空",
        "sort|require"=>"请输入排序值",
        "status|require"=>"请选择是否展示",
        "num|require"=>"请输入数量",
        "enough_price|require"=>"请输入门槛金额",
        "price|require"=>"请输入金额",
        "expire_days|require"=>"请输入过期时间",
    );
    protected $scene=array(
        "create"=>array("title","sort","status","num","enough_price","price","expire_days"),
        "update"=>array("id","title","sort","status","num","enough_price","price","expire_days"),
    );
}